﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace RsCms.UI.Models
{
    public class PostsModel
    {
        [JsonPropertyName("id")]
        public string Id { get; set; }

        [JsonPropertyName("canonical_url")]
        public string CanonicalUrl { get; set; }

        [JsonPropertyName("codeinjection_foot")]
        public string CodeinjectionFoot { get; set; }

        [JsonPropertyName("codeinjection_head")]
        public string CodeinjectionHead { get; set; }



        [JsonPropertyName("created_at")]
        public DateTime CreatedAt { get; set; }

        [JsonPropertyName("created_by")]
        public string CreatedBy { get; set; }

        /// <summary>
        /// 推荐此文章
        /// </summary>
        [JsonPropertyName("feature")]
        public sbyte Featured { get; set; }

        [JsonPropertyName("feature_image")]
        public string FeatureImage { get; set; }


        [JsonPropertyName("html")]
        public string Html { get; set; }

        [JsonPropertyName("md")]
        public string Markdown { get; set; } = "";
        [JsonPropertyName("locale")]
        public string Locale { get; set; }

        [JsonPropertyName("mobiledoc")]
        public string Mobiledoc { get; set; }

        [JsonPropertyName("plaintext")]
        public string Plaintext { get; set; }

        [JsonPropertyName("published_at")]
        public DateTime? PublishedAt { get; set; }

        [JsonPropertyName("published_by")]
        public string PublishedBy { get; set; }

        [JsonPropertyName("show_title_and_feature_image")]
        public sbyte ShowTitleAndFeatureImage { get; set; }

        [JsonPropertyName("slug")]
        public string Slug { get; set; }

        [JsonPropertyName("status")]
        public string Status { get; set; }

        [JsonPropertyName("title")]
        public string Title { get; set; }

        [JsonPropertyName("type")]
        public string Type { get; set; }

        [JsonPropertyName("updated_at")]
        public DateTime? UpdatedAt { get; set; }

        [JsonPropertyName("updated_by")]
        public string UpdatedBy { get; set; }

        [JsonPropertyName("uuid")]
        public string Uuid { get; set; }

        [JsonPropertyName("visibility")]
        public string Visibility { get; set; }
    }

    public class ArticleItemModel
    {
        [JsonPropertyName("id")]
        public string Id { get; set; }

        [JsonPropertyName("canonical_url")]
        public string CanonicalUrl { get; set; }

        [JsonPropertyName("codeinjection_foot")]
        public string CodeinjectionFoot { get; set; }

        [JsonPropertyName("codeinjection_head")]
        public string CodeinjectionHead { get; set; }



        [JsonPropertyName("created_at")]
        public DateTime CreatedAt { get; set; }

        [JsonPropertyName("created_by")]
        public string CreatedBy { get; set; }

        /// <summary>
        /// 推荐此文章
        /// </summary>
        [JsonPropertyName("feature")]
        public sbyte Featured { get; set; }

        [JsonPropertyName("feature_image")]
        public string FeatureImage { get; set; }


        [JsonPropertyName("html")]
        public string Html { get; set; }

     
        [JsonPropertyName("locale")]
        public string Locale { get; set; }

        [JsonPropertyName("mobiledoc")]
        public string Mobiledoc { get; set; }

        [JsonPropertyName("plaintext")]
        public string Plaintext { get; set; }

        [JsonPropertyName("published_at")]
        public DateTime? PublishedAt { get; set; }

        [JsonPropertyName("published_by")]
        public string PublishedBy { get; set; }

        [JsonPropertyName("show_title_and_feature_image")]
        public sbyte ShowTitleAndFeatureImage { get; set; }

        [JsonPropertyName("slug")]
        public string Slug { get; set; }

        [JsonPropertyName("status")]
        public string Status { get; set; }

        [JsonPropertyName("title")]
        public string Title { get; set; }

        [JsonPropertyName("type")]
        public string Type { get; set; }

        [JsonPropertyName("updated_at")]
        public DateTime? UpdatedAt { get; set; }

        [JsonPropertyName("updated_by")]
        public string UpdatedBy { get; set; }

        [JsonPropertyName("uuid")]
        public string Uuid { get; set; }

        [JsonPropertyName("visibility")]
        public string Visibility { get; set; }

       

        [JsonPropertyName("metas")]
        public List<PostMetaDto> posts_metas { get; set; }
    }
}
